<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>流程模型管理</title>
    <!-- 公共CSS,JS文件 -->
    <#include "../common/header.ftl"/>
</head>
<body>
<div class="container-fluid">
    <!-- 左右侧导航 -->
    <div class="row">
        <!-- 右侧导航 -->
        <div class="col-xs-12">
            <div class="panel">
                <div class="panel-heading">
                    <ol class="breadcrumb" style="margin-bottom: 2px;">
                        <li>首页</li>
                        <li>工作流管理</li>
                        <li>流程模型管理</li>
                        <div style="float: right; padding-bottom: 5px;"><a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon icon-refresh"></i></a></div>
                    </ol>
                </div>
                <#--内容-->
                <div class="panel-body">
                    <div id="toolbar" class="toolbox btn-group" style="padding-top:10px; padding-bottom:10px;">
                        <div class="tools-group">
                            <#--<@shiro.hasPermission name="admin:role:add">-->
                                <button class="btn btn-info" onclick="syncNode()"><i class="icon icon-check"></i>同步数据</button>
                            <#--</@shiro.hasPermission>-->
                            <#--<@shiro.hasPermission name="admin:role:add">-->
                                <button class="btn btn-primary" onclick="addNode()"><i class="icon icon-plus"></i>创建模型</button>
                            <#--</@shiro.hasPermission>-->
                        </div>
                    </div>
                    <table class="table table-hover">
                        <thead>
                        <tr>
                            <th><input type="checkbox" onclick="checkBox('ids',this.checked)"/></th>
                            <th>编号</th>
                            <th>模型编号</th>
                            <th>模型Key</th>
                            <th>模型名称</th>
                            <th>版本</th>
                            <th>创建时间</th>
                            <th>最后更新时间</th>
                            <th>元数据</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                            <#if models??>
                                <#list models as model>
                                    <tr>
                                        <th><input type="checkbox" class="checked_detect" value="${model.id! }" name="ids"/></th>
                                        <th>${model_index+1!}</th>
                                        <th>${model.id!}</th>
                                        <th>${model.key!}</th>
                                        <th>${model.name!}</th>
                                        <th>${model.version!}</th>
                                        <th>${(model.createTime!?string("yyyy-MM-dd hh:mm:ss"))!}</th>
                                        <th>${(model.lastUpdateTime!?string("yyyy-MM-dd hh:mm:ss"))!}</th>
                                        <th>${model.metaInfo!}</th>
                                        <th>
                                            <#--<@shiro.hasPermission name="admin:workflow:edit">-->
                                                <button class="btn btn-primary" onclick="editNode('${model.id! }')">编辑</button>
                                            <#--</@shiro.hasPermission>
                                            <@shiro.hasPermission name="admin:workflow:deployment">-->
                                                <button class="btn btn-primary" onclick="deploymentNode('${model.id! }')">部署</button>
                                            <#--</@shiro.hasPermission>-->
                                            <#--<@shiro.hasPermission name="admin:workflow:delete">-->
                                                <button class="btn btn-danger" onclick="deleteNode('${model.id! }')">删除</button>
                                            <#--</@shiro.hasPermission>
                                            <#--<@shiro.hasPermission name="admin:workflow:deployment">-->
                                                <button class="btn btn-warning" onclick="exportNode('${model.id! }')">导出</button>
                                            <#--</@shiro.hasPermission>-->
                                        </th>
                                    </tr>
                                </#list>
                            </#if>
                        </tbody>
                    </table>
                    <!-- 分页 start -->
                    <#--<#include "../../admin/common/page.ftl"/>-->
                    <!-- 分页 end -->
                </div>
            </div>
        </div>
    </div>
<#include "../common/footer.ftl"/>
</div>
<#--导入modelList.js文件-->
<script src="/static/zui/js/workflow/modelList.js"></script>
</body>
</html>